﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace vfife_building_algorithm
{
    public partial class Form_ParamSet : Form
    {
        public Form_ParamSet()
        {
            InitializeComponent();
        }

        private void bDone_Click(object sender, EventArgs e)
        {
            // TODO need to check !
            if (string.IsNullOrEmpty(textBoxEndTime.Text) || string.IsNullOrEmpty(textBoxTimeStep.Text)
                || string.IsNullOrEmpty(textBoxZeta.Text))
            {
                MessageBox.Show("Please enter the parameters !");
                return;
            }
            double endTime = double.Parse(this.textBoxEndTime.Text);
            double h = double.Parse(this.textBoxTimeStep.Text);
            double zeta = double.Parse(this.textBoxZeta.Text);

            Caculation_Parameters caculation_parameters = new Caculation_Parameters(endTime, h, zeta);
            Model.Caculation_parameters = caculation_parameters;

            this.Close();
        }
    }
}
